<template>

  <div id="basicLayout">
    <a-layout style="min-height: 100vh">
      <a-layout-header class="header"><global-header></global-header> </a-layout-header>

<!--        侧边栏-->
        <a-layout>
          <a-layout-sider v-if="loginUserStore.loginUser.id" class="sider"  ><GlobalSider   /></a-layout-sider>
            <a-layout-content class="content">
              <router-view />
            </a-layout-content>
        </a-layout>


      <a-layout-footer class="footer">
        <a href="https://www.codefather.cn/" target="_blank">GLM</a>
      </a-layout-footer>
    </a-layout>
  </div>
</template>

<script setup lang="ts">


import GlobalHeader from '@/components/GlobalHeader.vue'
import GlobalSider from '@/components/GlobalSider.vue'
import { ref } from 'vue'
import { useLoginUserStore } from '@/stores/useLoginUserStore.ts'

const collapsed = ref<boolean>(false);

// 获取登录用户
const loginUserStore = useLoginUserStore()
</script>



<style scoped>
#basicLayout  .header{
  padding-inline: 20px;
  background: white;
  color: unset;
  margin-bottom: 1px;
}
#basicLayout  .sider{

  background: #fff;
  border-right: 0.5px solid #eeeeee;
}

#basicLayout .content {
  padding: 28px;
  background: linear-gradient(to right,#fefefe,#fff);
  margin-bottom: 28px;
}

#basicLayout .footer{
  background: #efefef;
  padding: 16px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;

}
</style>
